import VueRouter from 'vue-router'

import Home from '../pages/Home.vue'
import Login from '../pages/Login.vue'
import Category from '../pages/Category.vue'
import Label from '../pages/Label.vue'
import Article from '../pages/Article.vue'
import Friend from '../pages/Friend.vue'
import User from '../pages/User.vue'

export default new VueRouter({
    // mode: 'history',
    routes: [
        {
            path: '/',
            redirect: '/Login'
        },
        {
            name: 'Login',
            path: '/Login',
            component: Login,
        },
        {
            name:'Home',
            path:'/Home',
            component:Home,
            children: [
                {
                    name: 'Category',
                    path: 'Category',
                    component: Category,
                },
                {
                    name: 'Label',
                    path: 'Label',
                    component: Label,
                },
                {
                    name: 'Article',
                    path: 'Article',
                    component: Article,
                },
                {
                    name: 'Friend',
                    path: 'Friend',
                    component: Friend,
                },
                {
                    name: 'User',
                    path: 'User',
                    component: User,
                }
            ]
        }

    ]
})